<%@page import="qingke.mybatis.pojo.Store"%>
<%@page import="qingke.mybatis.pojo.UserLogin"%>
<%@page import="java.util.Map"%>
<%@page import="qingke.bean.Admin"%>
<%@page import="java.util.List"%>
<%@page import="qingke.mybatis.pojo.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="${pageContext.request.contextPath }/css/personalcenter.css"
	type="text/css" rel="stylesheet" />
<link href="${pageContext.request.contextPath }/css/bootstrap.min.css"
	type="text/css" rel="stylesheet" />
<script src="${pageContext.request.contextPath }/js/jquery-1.8.3.min.js"></script>
<script src="${pageContext.request.contextPath }/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath }/js/personal.js"></script>
</head>
<%
	Object obj = session.getAttribute("admin");
	Admin admin = null;
	if (obj != null) {
		if (obj instanceof Admin) {
			admin = (Admin) obj;
		}
	}
%>
<%
	Object storesObject = session.getAttribute("AdmingetStores");
	List<Store> stores = null;
	if (storesObject != null) {
		if (storesObject instanceof List) {
			stores = (List) storesObject;
		}
	}
%>
<body onload="getVip()">
	<div class="person-content-location">
		<a href="">当前位置</a> > <a href="">个人中心</a> > <a href="">用户信息</a>
	</div>

	<hr />
	<%
		if (admin != null) {
			if (stores != null) {
				for (Store store : stores) {
					if (store != null) {
	%>
	<div class="panel-group" id="accordion1">
		<div class="panel panel-default">
			<div class="panel-heading" style="background: #1ea2b0">
				<h4 class="panel-title">
					<a data-toggle="collapse"
						data-parent="#accordion<%=store.getId()%>"
						href="#collapseOne<%=store.getId()%>"><%=store.getStoreName()%></a>
					<button style="float: right; background: #1ea2b0; border: 0px"
						onclick="modify('basemessage<%=store.getId()%>')">修改</button>
				</h4>
			</div>
			<div id="collapseOne<%=store.getId()%>"
				class="panel-collapse collapse">
				<div class="panel-body">
					<form id="basemessage<%=store.getId()%>" action="adminChangeUser">
						<div>
							<label for="id">&#12288;id ： </label><input id="id" name="id"
								value="<%=store.getId()%>" disabled="disabled"
								onfocus=this.blur() readonly="true" />
						</div>
						<div>
							<label for="username">店铺名称 ： </label><input id="username"
								name="username" value="<%=store.getStoreName()%>"
								disabled="disabled" />
						</div>
						<div>
							<label for="usertel">店铺电话 ： </label><input id="usertel"
								name="usertel" value="<%=store.getStoreTel()%>"
								disabled="disabled" />
						</div>
						<div>
							<label for="useraddress">店铺住址 ： </label><input id="useraddress"
								name="useraddress" value="<%=store.getStoreAddress()%>"
								disabled="disabled" />
						</div>
					</form>
				</div>
			</div>
		</div>
		<br />
		<%
			}
					}
		%>
	</div>
	<%
		}
		}
	%>
	<script>
		function freezeornot(name, userId, canuse) {
			var params = {};
			params.id = userId;
			params.canuse = canuse;
			if (confirm("是否确定" + name)) {
				$.ajax({
					url : "http://localhost:8080/bishe/freezeOrNot",
					method : "post",
					dataType : "json",
					data : params,
					success : function() {
						window.location.href = "usersMessage"
					}
				});
			}
		}
	</script>
</body>
</html>